package bean;

import java.util.ArrayList;

/**
 * This is a bean for a interface. An interface contains a series of attibutes,
 * a parameter list and a expect result list.
 * 
 * @author tanjian
 * 
 */
public class CommonInterface {
	private String id;
	private String definition;
	private String docId;
	private String name;
	private String deploy;
	private String support;
	private String note;
	private String type;
	private String reqId;
	private String permission;
	private String path;
	private String status;
	private String subPath;
	private ArrayList<Item> params;
	private ArrayList<Item> expResult;
	private String paramsPath;
	private String expResultPath;
	private String testSuiteTemplate;
	private String project;

	/**
	 * Default constructor.
	 */
	public CommonInterface() {

	}

	/**
	 * Construstor with its source file path.
	 * 
	 * @param definition
	 */
	public CommonInterface(String definition) {
		this.setDefinition(CommonInterface.class.getClassLoader().getResource(
				definition).getPath());
	}

	public String getDocId() {
		return docId;
	}

	public void setDocId(String docId) {
		this.docId = docId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDeploy() {
		return deploy;
	}

	public void setDeploy(String deploy) {
		this.deploy = deploy;
	}

	public String getSupport() {
		return support;
	}

	public void setSupport(String support) {
		this.support = support;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getType() {
		return type;
	}

	/**
	 * This method returns a enum from string
	 * 
	 * @return
	 */
	public InterfaceType getEnumType() {
		return InterfaceType.valueOf(type);
	}

	public String getReqId() {
		return reqId;
	}

	public void setReqId(String reqId) {
		this.reqId = reqId;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSubPath() {
		return subPath;
	}

	public void setSubPath(String subPath) {
		this.subPath = subPath;
	}

	public void setParams(ArrayList<Item> params) {
		this.params = params;
	}

	public ArrayList<Item> getParams() {
		return params;
	}

	public void setExpResult(ArrayList<Item> expResult) {
		this.expResult = expResult;
	}

	public ArrayList<Item> getExpResult() {
		return expResult;
	}

	public String getParamsPath() {
		return paramsPath;
	}

	public void setParamsPath(String paramsPath) {
		this.paramsPath = paramsPath;
	}

	public String getExpResultPath() {
		return expResultPath;
	}

	public void setExpResultPath(String expResultPath) {
		this.expResultPath = expResultPath;
	}

	public void setDefinition(String definition) {
		this.definition = definition;
	}

	public String getDefinition() {
		return definition;
	}

	public void setTestSuiteTemplate(String testSuiteTemplate) {
		this.testSuiteTemplate = testSuiteTemplate;
	}

	public String getTestSuiteTemplate() {
		return testSuiteTemplate;
	}

	public void setProject(String project) {
		this.project = project;
	}

	public String getProject() {
		return project;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

}
